import * as req from '@/request';

export async function list(
  params: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.postForm<API.BlacklistDeviceList>(
    '/blacklistDevice/list',
    params,
    sorter,
    filter,
  );
}

export async function addBlacklist(data: { [key: string]: any }) {
  return req.postJson<API.Result>('/blacklistDevice/addBlacklist', data);
}

export async function addWhitelist(data: { key: string }) {
  return req.post<API.Result>('/blacklistDevice/addWhitelist', data);
}
